import {createRouter,createWebHistory} from "vue-router";
export default createRouter({
    history:createWebHistory(),
    routes:[
        {
            path:'/',
            component:()=>import('../components/common/Login'),
            meta:{
                title:"flashmall后台登录系统"
            }
        },
        {
            path:'/register',
            component:()=>import('../components/common/Register'),
            meta:{
                title:"flashmall后台注册系统"
            }
        },
        {
            path:'/main',
            component:()=>import('../components/common/Main'),
            meta:{
                title:"flashmall后台管理系统"
            },
            children:[
                {
                    path:'user/address',
                    meta:{
                        title:'用户订单管理'
                    },
                    component:()=>import('../components/user/Address')
                },
                {
                    path:'order/orderitem',
                    meta:{
                        title:'子订单管理'
                    },
                    component:()=>import('../components/order/OrderItem')
                },
                {
                    path:'order/order',
                    name:'order',
                    meta:{
                        title:'订单管理'
                    },
                    component:()=>import('../components/order/Order')
                },
                {
                    path:'user/umsuser',
                    meta:{
                        title:'用户管理'
                    },
                    component:()=>import('../components/user/UmsUser')
                },
                {
                    path:'product/attributeGroup',
                    meta:{
                        title:'属性组管理'
                    },
                    component:()=>import('../components/product/AttributeGroup')
                },
                {
                    path:'product/spuinfo',
                    meta:{
                        title:'SpuInfo管理'
                    },
                    component:()=>import('../components/product/SpuInfo')
                },
                {
                    path:'product/spuAttr',
                    meta:{
                        title:'Spu属性管理'
                    },
                    component:()=>import('../components/product/SpuAttr')
                },
                {
                    path:'product/attribute',
                    name:'attribute',
                    meta:{
                        title:'属性管理'
                    },
                    component:()=>import('../components/product/Attribute')

                },
                {
                    path:'product/skuAttr',
                    meta:{
                        title:'Sku属性管理'
                    },
                    component:()=>import('../components/product/SkuAttr')
                },
                {
                    path:'product/skuinfo',
                    name:'skuinfo',
                    meta:{
                        title:'SkuInfo管理'
                    },
                    component:()=>import('../components/product/SkuInfo')
                },
                {
                    path:'product/category',
                    meta:{
                        title:'商品类别管理'
                    },
                    component:()=>import('../components/product/Category')
                },
                {
                    path:'product/brand',
                    meta:{
                        title:'品牌管理'
                    },
                    component:()=>import('../components/product/Brand')
                },
                {
                    path:'/admin/user',
                    name:'admin_user',
                    meta:{
                        title:'用户管理'
                    },
                    component:()=>import('../components/admin/User')
                },
                {
                    path:'admin/authority',
                    name:'authority',
                    meta:{
                        title:'权限管理'
                    },
                    component:()=>import('../components/admin/Authority')
                },
                {
                    path:'welcome',
                    meta:{
                        title:'欢迎使用'
                    },
                    component:()=>import('../components/common/Welcome')
                }
            ]
        }
    ]
})
